package it.scambiocorse.rowmapper;

import it.scambiocorse.model.ClienteType;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;
import org.springframework.jdbc.core.RowMapper;

public class ClientiRowMapper implements 	RowMapper {


	public Object mapRow(ResultSet rs, int row) throws SQLException {
		
		ClienteType cliente = new ClienteType();
		
		cliente.setIdCliente(rs.getInt("id_cliente"));
		cliente.setIdUser(rs.getInt("id_user_inse"));
		cliente.setDescNome(rs.getString("desc_nome"));
		cliente.setTelefono(rs.getString("tel"));

		return cliente;
	}

}
